home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / tex / flip1exe.zip / PATCH.MSC < prev   
Text File  |  1989-07-27  |  6KB  |  205 lines

  1. Patches to the flip 1.0 source package to support Microsoft C 5.1
  2. under MS-DOS, supplied by Tom Horsley <tom@ssd.harris.com>.
  3.  
  4. *** Checksums.orig    Sun Jul 23 15:31:53 1989
  5. --- Checksums    Thu Jul 27 07:33:11 1989
  6. ***************
  7. *** 1,17 ****
  8. ! # Whole file CRCs generated by Brik v1.0.  Use "brik -C" to verify them.
  9.   
  10.   # CRC-32        filename
  11.   # ------        --------
  12.   
  13. ! 2395754544      FILES
  14.   1324253258      flip.1
  15. ! 2015490080      flip.c
  16. !  116242883      flip.h
  17.   3654056916      flip.man
  18.   3390294771      flip.prj
  19.   2215166699      getopt.c
  20.   3196976162      install.doc
  21.   3441461244      makefile.nix
  22.   2236661872      makefile.tcc
  23. ! 3460687634      turboc.c
  24.   1182134946      turboc.cfg
  25. --- 1,19 ----
  26. ! # Whole file CRCs generated by Brik v2.0.  Use "brik -C" to verify them.
  27.   
  28.   # CRC-32        filename
  29.   # ------        --------
  30.   
  31. ! 1646185146      FILES
  32.   1324253258      flip.1
  33. ! 2399470223      flip.c
  34. !  645812896      flip.h
  35. ! 1791966002      flip.hdr
  36.   3654056916      flip.man
  37.   3390294771      flip.prj
  38.   2215166699      getopt.c
  39.   3196976162      install.doc
  40. +  458838271      makefile.msc
  41.   3441461244      makefile.nix
  42.   2236661872      makefile.tcc
  43. ! 1222195395      turboc.c
  44.   1182134946      turboc.cfg
  45. *** FILES.orig    Sun Jul 23 15:31:54 1989
  46. --- FILES    Thu Jul 27 07:22:19 1989
  47. ***************
  48. *** 11,16 ****
  49. --- 11,17 ----
  50.      2801   getopt.c          (generic) getopt function C source
  51.   
  52.       605   makefile.tcc      (ms-dos/turbo c) make file
  53. +     653   makefile.msc      (ms-dos/Msc 5.1) make file
  54.        56   flip.prj          (ms-dos/turbo c) project file
  55.       140   turboc.cfg        (ms-dos/turbo c) configuration file
  56.     10224   turboc.c          (ms-dos/turbo c) C source
  57. *** flip.c.orig    Sun Jul 23 15:31:55 1989
  58. --- flip.c    Thu Jul 27 07:20:13 1989
  59. ***************
  60. *** 6,12 ****
  61.   /*
  62.   Copyright 1989 Rahul Dhesi, All rights reserved.
  63.   
  64. ! Checksum: 1217582374 (check or update with "brik")
  65.   */
  66.   
  67.   /*
  68. --- 6,12 ----
  69.   /*
  70.   Copyright 1989 Rahul Dhesi, All rights reserved.
  71.   
  72. ! Checksum: 4129017624 (check or update with "brik")
  73.   */
  74.   
  75.   /*
  76. ***************
  77. *** 509,515 ****
  78.             trailing control Z removed, embedded control Z unchanged)\n\
  79.      -m     convert to MS-DOS format (lone LF => CR LF, lone CR unchanged)\n\
  80.      -h     give this help message\n\
  81. !    -v     be verbose, print filenames as they are processed\n\
  82.      -t     touch files (don't preserve timestamps)\n\
  83.      -s     strip high bit\n\
  84.      -b     convert binary files too (else binary files are left unchanged)\n\
  85. --- 509,516 ----
  86.             trailing control Z removed, embedded control Z unchanged)\n\
  87.      -m     convert to MS-DOS format (lone LF => CR LF, lone CR unchanged)\n\
  88.      -h     give this help message\n\
  89. !    -v     be verbose, print filenames as they are processed\n");
  90. ! printf("\
  91.      -t     touch files (don't preserve timestamps)\n\
  92.      -s     strip high bit\n\
  93.      -b     convert binary files too (else binary files are left unchanged)\n\
  94. *** flip.h.orig    Sun Jul 23 15:31:56 1989
  95. --- flip.h    Thu Jul 27 07:20:13 1989
  96. ***************
  97. *** 3,9 ****
  98.   /*
  99.   Copyright 1989 Rahul Dhesi, All rights reserved.
  100.   
  101. ! Checksum: 2652839101 (check or update with "brik")
  102.   
  103.   ANSI-compatibility strategy:
  104.   
  105. --- 3,9 ----
  106.   /*
  107.   Copyright 1989 Rahul Dhesi, All rights reserved.
  108.   
  109. ! Checksum: 1195850648 (check or update with "brik")
  110.   
  111.   ANSI-compatibility strategy:
  112.   
  113. ***************
  114. *** 18,23 ****
  115. --- 18,28 ----
  116.   
  117.   #ifndef OK_NL
  118.   
  119. + /* Microsoft is only slightly different than TURBO, so define both */
  120. + #ifdef MSC51
  121. + #define TURBOC
  122. + #endif
  123.   /* Define ANSIPROTO and/or STDINCLUDE here if needed */
  124.   #ifdef TURBOC
  125.   # define    ANSIPROTO
  126. ***************
  127. *** 117,126 ****
  128. --- 122,141 ----
  129.   # define WILDCARD
  130.   
  131.   /* date and time */
  132. + #ifdef MSC51
  133. + # include <sys/types.h>          /* for file time */
  134. + # include <sys/stat.h>           /* for file time */
  135. +   typedef struct stat            SGFTIME;
  136. + # define GETFT(file,name,var)    fstat(fileno(file),&var)
  137. + # define SETFT(file,name,var)    do { time_t x[2]; x[0] = var.st_atime; \
  138. +                                       x[1] = var.st_mtime; utime (name, x); \
  139. +                                   } while (0)
  140. + #else
  141.   # include <io.h>
  142.     typedef struct ftime        SGFTIME;
  143.   # define GETFT(f,name,var)    getftime(fileno(f), &var)
  144.   # define SETFT(f,name,var)    setftime(fileno(f), &var)
  145. + #endif /* MSC51 */
  146.   #endif /* TURBOC */
  147.   
  148.   #ifdef SYS_V
  149. *** turboc.c.orig    Sun Jul 23 15:31:59 1989
  150. --- turboc.c    Thu Jul 27 07:20:14 1989
  151. ***************
  152. *** 10,16 ****
  153.   */
  154.   
  155.   /*
  156. ! Checksum: 3933529970      (check or update this with "brik")
  157.   */
  158.   
  159.   /*
  160. --- 10,16 ----
  161.   */
  162.   
  163.   /*
  164. ! Checksum: 3190502703      (check or update this with "brik")
  165.   */
  166.   
  167.   /*
  168. ***************
  169. *** 323,325 ****
  170. --- 323,355 ----
  171.   {
  172.      setcbrk (brk_flag);
  173.   }
  174. + #ifdef MSC51
  175. + /* Generally Borland and Microsoft have pretty compatible libraries, but
  176. +  * Microsoft does not have these - I am guessing that this is what they
  177. +  * are supposed to do.
  178. +  */
  179. + int
  180. + getcbrk()
  181. + {
  182. +    union REGS r_in, r_out;
  183. +    r_in.h.ah = 0x33;
  184. +    r_in.h.al = 1;
  185. +    r_in.h.dl = (brk_flag != 0);
  186. +    intdos(&r_in, &r_out);
  187. +    return r_out.h.dl;
  188. + }
  189. + int
  190. + setcbrk(brk_flag)
  191. +    int   brk_flag;
  192. + {
  193. +    union REGS r;
  194. +    r.h.ah = 0x33;
  195. +    r.h.al = 1;
  196. +    r.h.dl = (brk_flag != 0);
  197. +    intdos(&r, &r);
  198. + }
  199. + #endif
  200.